package com.yeyks.hotel.dal.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeyks.hotel.dal.domain.RoomInfo;
import com.yeyks.hotel.param.HotelInfoHotelSearchHotelInfoParam;
import com.yeyks.hotel.vo.HotelInfoHotelSearchHotelInfoRoomInfoVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


/**
 * <p>
 * 房间表 Mapper 接口
 * </p>
 *
 * @author yun
 * @since 2019-06-25
 */
public interface RoomInfoMapper extends BaseMapper<RoomInfo> {
    List<RoomInfo> selectByHotelId(Integer id);

    List<RoomInfo> searchRoomByHotelId(Integer id);

    List<RoomInfo> queryRoomListByHotelId(Integer id);

    List<RoomInfo> queryVIPRoomListByHotelId(Integer id);

    List<RoomInfo> queryJIPRoomListByHotelId(Integer id);

  //  int insertReturnId(RoomInfo record);

    int updateRoomValid(@Param("ids") List<Integer> ids, @Param("valid") Boolean valid);

    List<RoomInfo> selectByHotelIds(@Param("ids") List<Integer> ids);

    List<RoomInfo> selectByHotelIdAndTitle(@Param("id") Integer id, @Param("title") String title);

    List<RoomInfo> selectByIds(@Param("ids") List<Integer> ids);

    int updateExtraInfo(@Param("id") Integer id, @Param("info") String info);

    int updateIfNotNullByPrimaryKey(RoomInfo record);

    List<RoomInfo> selectRoomsByHotelId(Map<String, Object> map);

    int deleteAndUpdateById(@Param("id") Integer id, @Param("isDel") Integer isDel);

    List<RoomInfo> selectRoomByAvailable();

    RoomInfo selectByPrimaryKey(Integer id);

    int updateByPrimaryKey(RoomInfo record);

    List<RoomInfo> selectNormalRoom();

    List<RoomInfo> selectVipRoom(Integer vipFlag);

    List<RoomInfo> vipSelectRoomsByHotelId(Map<String, Object> map);

    List<RoomInfo> selectValidByHotelId(Integer hotelId);

    List<RoomInfo> selectRoomsByHotelIdNew(Map<String, Object> map);

    List<RoomInfo> selectVipByHotelId(@Param("hotelId") Integer hotelId);

    List<RoomInfo> getRoomInfos(Map<String, Object> map);

    //酒店搜索时展示的甄选酒店房间信息
    List<HotelInfoHotelSearchHotelInfoRoomInfoVo> hotelSearchRoomInfoInHotelInfo(@Param("param") HotelInfoHotelSearchHotelInfoParam param);

    //酒店搜索时展示的jip酒店房间信息
    List<HotelInfoHotelSearchHotelInfoRoomInfoVo> hotelSearchRoomInfoInJipHotelInfo(@Param("param") HotelInfoHotelSearchHotelInfoParam param);

    /**
     * admin - app 更新客房基本信息
     * @param record 客房输入参数
     * @return 返回结果
     */
    int updateByPrimaryKeySelective(RoomInfo record);
}
